<%-- 
    Document   : contactDetail1
    Created on : Jun 8, 2012, 12:03:36 PM
    Author     : VANANH
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
<%@taglib prefix="rich" uri="http://richfaces.org/rich" %>
<%@taglib prefix="a4j" uri="http://richfaces.org/a4j" %>

<html>
    <head>
        <script type="text/javascript" language="javascript" src="../scripts/jQuery/kapi.js"></script>
        <script type="text/javascript" language="javascript" src="../scripts/jQuery/confirm.js"></script>
        <link rel="stylesheet" type="text/css" href="../css/employee.css"/>
        <style>
            span img{
                width: 15px;
                height: 15px;
            }
            .mag_nums{
                margin-left: 7px;
                margin-right: 7px;
            }
        </style>
    </head>

    <body>
        <f:view>
            <f:loadBundle basename="#{environmentSession.localizationSource}" var="locale"/>
            <a4j:form >
                <div class="content_detail">
                    <div class="list_item_user">
                        <div class="item_content" style="display: block">
                            <div class="infomation_form"> 
                                <div class="card_add">

                                    <h:outputLink rendered="#{contactController.add}"  value="editContact.jsp?action=add&fn100A=#{contactController.fn100}&page=#{contactController.pagereload}&height=340px&width=568px" styleClass="fancybox">
                                        <img src="../images/add_tab.png" alt="add" title="add" /><h:outputText value="#{locale.contact_info}"/> 
                                    </h:outputLink>

                                </div>
                                <div class="item_work_content">
                                    <rich:dataTable value="#{contactController.listFind_N950}" var="item" rows="20" rowKeyVar="row" id="table" >

                                        <rich:column width="3%">
                                            <f:facet name="header">
                                                <h:outputText value="STT" />
                                            </f:facet>
                                            <div style="width:100%;text-align: center;">
                                            <h:outputText value="#{row+1}" id="make" />
                                            </div>
                                        </rich:column>
                                        <rich:column width="10%">
                                            <f:facet name="header">
                                                <h:outputText value="Điện thoại" />
                                            </f:facet>
                                            <div style="width:100%;text-align: center;">
                                                 <h:outputText  value="#{item.MOB1}"/>
                                                        <h:outputText styleClass="mag_nums" rendered="#{ item.MOB2 !='' && item.MOB2 !=null}" value="-"/>
                                                        <h:outputText  value="#{item.MOB2}"/>
                                                        <h:outputText styleClass="mag_nums" rendered="#{item.MOB3 !=''&& item.MOB3 !=null}" value="-"/>
                                                        <h:outputText  value="#{item.MOB3}"/>    
                                            </div>
                                        </rich:column>
                                        <rich:column width="10%">
                                            <f:facet name="header">
                                                <h:outputText value="Fax" />
                                            </f:facet>
                                              <div style="width:100%;text-align: center;">
                                           <h:outputText  value="#{item.FAX1}"/>
                                                        <h:outputText styleClass="mag_nums" rendered="#{ item.FAX2 !=''&& item.FAX2 !=null}" value="-"/>
                                                        <h:outputText  value="#{item.FAX2}"/>
                                                        <h:outputText styleClass="mag_nums" rendered="#{item.FAX3 !=''&& item.FAX3 !=null}" value="-"/>
                                                        <h:outputText  value="#{item.FAX3}"/> 
                                              </div>
                                        </rich:column>
                                        <rich:column width="20%">
                                            <f:facet name="header">
                                                <h:outputText value="Email" />
                                            </f:facet>
                                            <div style="width:100%;text-align: left;">
                                                <h:outputLink value="popupSendMailPerson.jsp?page=contactDetail&idx=#{item.ADRID}&mailx=#{item.EML1}&typex=contactDetail&KeepThis=true&amp;TB_iframe=true&amp;height=653&amp;width=741&amp;modal=true" styleClass="thickbox add_new" id="thickbox3" style="position: absolute;margin-left:3px;"  ><h:outputText value="#{item.EML1}" style="position: absolute;margin-left:3px;"/></h:outputLink>
                                                
                                            </div>
                                        </rich:column>
                                        <rich:column width="17%">
                                            <f:facet name="header">
                                                <h:outputText value="Yahoo" />
                                            </f:facet>
                                            <div style="width:100%;text-align: left;">
                                                <h:outputText value="#{item.EML3}"/>
                                            </div>
                                           
                                        </rich:column>
                                        <rich:column width="15%">
                                            <f:facet name="header">
                                                <h:outputText value="Skype" />
                                            </f:facet>
                                             <div style="width:100%;text-align: left;">
                                           <h:outputText value="#{item.EML2}"/>
                                             </div>
                                        </rich:column>
                                        <rich:column width="20%">
                                            <f:facet name="header">
                                                <h:outputText value="Địa chỉ" />
                                            </f:facet>
                                            <div style="width:100%;text-align: left;">
                                                <h:outputText value="#{item.str1}, #{item.WARD}, #{item.DIST}, #{item.CITY}"/>
                                            </div>
                                        </rich:column>
                                        
                                        <rich:column width="5%">
                                            <f:facet name="header">
                                                 <h:outputText value="Actions" />   
                                            </f:facet>
                                                <div style="width:100%;text-align: center;">
                                            <h:outputLink rendered="#{contactController.edit}"  value="editContact.jsp?action=edit&fn100E=#{item.ADRID}&pn950E=#{item.ADRNO}&page=#{contactController.pagereload}&height=350px&width=550px" styleClass="fancybox card_edit" id="fancybox"  >
                                                <img src="../images/edit.png" alt="edit" title="edit" />                                                    
                                            </h:outputLink>
                                            <h:outputLink rendered="#{contactController.delete}"  value="delete.jsp?id=#{item.ADRNO}&pn100C=#{item.ADRID}&flag=N950&page=#{contactController.pagereload}&height=150px&width=300px" styleClass="fancybox card_delete" >
                                                <img src="../images/delete_1.png" alt="delete" title="delete" />                                               
                                            </h:outputLink>
                                                </div>
                                        </rich:column>

                                    </rich:dataTable>
                                    <h:inputHidden value="#{contactController.pagereload}" id="pagereload"/>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

            </a4j:form>
        </f:view>
    </body>
</html>